0f868c9336512e6f940dc25284548919da6d2f59,portal-impl/src/com/liferay/portlet/announcements/service/http/AnnouncementsEntryJSONSerializer.java,AnnouncementsEntryJSONSerializer,toJSONObject,#AnnouncementsEntry#,53
Before Change
jsonObj.put("companyId", model.getCompanyId());
jsonObj.put("userId", model.getUserId());
jsonObj.put("userName", model.getUserName());
jsonObj.put("createDate", model.getCreateDate().getTime());
jsonObj.put("modifiedDate", model.getModifiedDate().getTime());
jsonObj.put("classNameId", model.getClassNameId());
jsonObj.put("classPK", model.getClassPK());
jsonObj.put("title", model.getTitle());
After Change
jsonObj.put("userId", model.getUserId());
jsonObj.put("userName", model.getUserName());
Date createDate = model.getCreateDate();
String createDateJSON = StringPool.BLANK;
if (createDate != null) {
createDateJSON = String.valueOf(createDate.getTime());
}
jsonObj.put("createDate", createDateJSON);
Date modifiedDate = model.getModifiedDate();
String modifiedDateJSON = StringPool.BLANK;
if (modifiedDate != null) {
modifiedDateJSON = String.valueOf(modifiedDate.getTime());
}
jsonObj.put("modifiedDate", modifiedDateJSON);
jsonObj.put("classNameId", model.getClassNameId());
jsonObj.put("classPK", model.getClassPK());
jsonObj.put("title", model.getTitle());
jsonObj.put("content", model.getContent());
jsonObj.put("url", model.getUrl());
jsonObj.put("type", model.getType());
Date displayDate = model.getDisplayDate();
String displayDateJSON = StringPool.BLANK;
if (displayDate != null) {
displayDateJSON = String.valueOf(displayDate.getTime());
}
jsonObj.put("displayDate", displayDateJSON);
Date expirationDate = model.getExpirationDate();
String expirationDateJSON = StringPool.BLANK;
if (expirationDate != null) {
expirationDateJSON = String.valueOf(expirationDate.getTime());
}
jsonObj.put("expirationDate", expirationDateJSON);